import React, {Component} from 'react';
import {Layout} from 'antd';
import Menu from '../menu/menu';
import Body from '../body/body';

export default class home extends Component {
    constructor(props) {
        super(props);
        this.state = {
            choose_num: 0
        }
    }

    onChangeNum(e) {
        this.setState({
            choose_num: e
        })
    }

    render() {

        return (
            <div className="layout">
                <Layout style={{height: '100%'}}>
                    <Menu choose={this.state.choose_num} onChange={this.onChangeNum.bind(this)}/>
                    <Body choose={this.state.choose_num} onChange={this.onChangeNum.bind(this)}/>
                </Layout>
            </div>
        )
    }
}
